<include file="Public:pagerForm"/>
<div class="pageHeader">
    <eq name='act' value='1'>
        <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__CONTROLLER__/index" method="post">
    <else/>
        <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__CONTROLLER__/auditDocInfo" method="post">
    </eq>
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    标题：<input type="text" name="title" value="<{$Think.post.title}>"/>
                </td>
                <td>
                    内容关键字：<input type="text" name="content" value="<{$Think.post.content}>"/>
                </td>
                <td>
                    发布人：<input type="text" name="nickName" value="<{$Think.post.nickName}>"/>
                </td>
            </tr>
        </table>	
        <div class="subBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
            </ul>
        </div>
    </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <eq name="act" value="2">
                <li><a class="add" href="__CONTROLLER__/dShow" target="dialog" mask="true" width="500" height="600"><span>添加帖子</span></a></li>
            </eq> 
            <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="id[]" href="__CONTROLLER__/del" class="delete"><span>批量删除</span></a></li>
            <if condition="$Think.session.type gt 1">
                <eq name="act" value="2">
                    <li><a title="确实审核这些记录吗?" target="selectedTodo" rel="id[]" postType="string" href="__CONTROLLER__/alledit" class="add"><span>批量审核</span></a></li>
                <else/>
                    <li><a title="确实设为待审核吗?" target="selectedTodo" rel="id[]" postType="string" href="__CONTROLLER__/audit" class="add"><span>批量待审</span></a></li>
                </eq>
            </if>  
          
            <li><a class="edit" href="__CONTROLLER__/dShow/id/{doc_id}" target="dialog" mask="true" warn="请选择一条信息" width="500" height="600"><span>修改</span></a></li>
         
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138" nowrapTD="false">
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="id[]" class="checkboxCtrl"></th>
                <th width="30"  align="center">序号</th>
                <th width="120" align="center">标题</th>
                <th width="80" align="center">分类</th>
                <th width="280">内容</th>
                <th width="360" align="center">图片</th>
                <th width="80" align="center">发布人</th>
                <th width="100"  orderField='publishTime' <if condition="$_REQUEST['_order'] eq 'publishTime'">class="<{$_REQUEST._sort}>"</if> align="center">发布时间</th>
                <th width="80" align="center">积分奖励</th>
                <th width="180" align="center">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php $i=1;?> 
            <foreach name='docList' item="list">
                <tr target="doc_id" rel="<{$list.id}>">
                <td><input name="id[]" value="<{$list.id}>" type="checkbox"></td>
                <td><{$i}></td>
                <td><{$list.title}></td>
                <td><{$list.type|getForum=1}></td>
                <td><{$list.content}></td>
                <td class="imgs">
                    <img src="<{$Think.const.PUBLIC_URL}>upload/<{$list.image|subImg=1}>" width="95px"/>
                    <neq name="list['image']|subImg=2" value=''>
                        <img src="<{$Think.const.PUBLIC_URL}>upload/<{$list.image|subImg=2}>" width="95px"/>
                    
                        <neq name="list['image']|subImg=3" value=''>
                            <img src="<{$Think.const.PUBLIC_URL}>upload/<{$list.image|subImg=3}>" width="95px"/>
                        </neq>
                    </neq>
                </td>
                <td><{$list.userid|getUserName}></td>
                <td><{$list.publishtime|substr=0,10}></td>
                <td><{$list.reward}></td>          
                <td>
                    <if condition="$Think.session.type gt 1">
                        <eq name="act" value="2">
                            <a title="确定审核" target="ajaxTodo" href="__CONTROLLER__/alledit/id/<{$list.id}>" class="edit">审核 | </a> 
                            <a title="删除" target="ajaxTodo" href="__CONTROLLER__/del/id/<{$list.id}>" >删除</a>
                           
                        <else/>
                            <a title="设为待审核" target="ajaxTodo" href="__CONTROLLER__/audit/id/<{$list.id}>" class="edit">待审核 | </a>
                            <a title="删除" target="ajaxTodo" href="__CONTROLLER__/del/id/<{$list.id}>" >删除</a>
                        </eq>                        
                    <else/>
                        <eq name="act" value="2">
                            待审核 | <a title="删除" target="ajaxTodo" href="__CONTROLLER__/del/id/<{$list.id}>" >删除</a>                        
                            
                        <else/>
                            已审核 | <a title="删除" target="ajaxTodo" href="__CONTROLLER__/del/id/<{$list.id}>" >删除</a>
                        </eq>  
                        
                    </if>
                    <eq name="act" value='1'>
                        <a href="__CONTROLLER__/comment/doc_id/<{$list.id}>" target="Navtab"> | 查看回帖</a>
                    </eq>
                </td>
            </tr>
            <?php $i++;?>
            </foreach>
        </tbody>        
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共<{$totalCount}>条</span>          
        </div>
        <div class="pagination" targetType="navTab" totalCount="<{$totalCount}>" numPerPage="<{$numPerPage}>" pageNumShown="6"  currentPage="<{$currentPage}>"></div>
    </div>
</div>
<style type="text/css" media="screen">
    .imgs{text-align:center;}
    .imgs div{height:100px!important;}
</style>